#pragma once
#include "Common.h"
#include <WinSock2.h>
#include <Iphlpapi.h>
#include <QObject>
#pragma comment (lib, "Iphlpapi.lib")

static char TcpState[][32] =
{
"???",
"CLOSED",
"LISTENING",
"SYN_SENT",
"SEN_RECEIVED",
"ESTABLISHED",
"FIN_WAIT",
"FIN_WAIT2",
"CLOSE_WAIT",
"CLOSING",
"LAST_ACK",
"TIME_WAIT"
};

struct ScanData 
{
	QString szLocalIP;
	QString szRemoteIP;
	int status;
};

class PortScan
{
public:
	PortScan();
	~PortScan();

	DWORD EnumTCPTable();

	std::vector<ScanData>& GetData();

	bool EnableNetwork(bool bEnable);

private:
	

private:
	std::vector<ScanData> m_data;
};

